import { createStore } from "vuex";
import createPersistedstate from "vuex-persistedstate";
import getters from "./getters";
import app from "./modules/app";
import user from "./modules/user";
import im from "./modules/im";
import streamData from "./modules/streamData";

let modules = {
  app,
  user,
  im,
  streamData
};

export default createStore({
  modules,
  getters,
  plugins: [
    createPersistedstate({
      key: "--APP-STORAGE--"
      // paths: ["user"]
    })
  ]
});
